Crystal Space
Welcome, Guest. Please login or register.
October 23, 2014, 06:31:08 am

Login with username, password and session length
Search:     Advanced search
9010 Posts in 2044 Topics by 8797 Members
Latest Member: Pamelaboone
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  CS + MinGW + Eclipse problems
« previous next »
Pages: [1] Print
Author Topic: CS + MinGW + Eclipse problems  (Read 7486 times)
Caposite
Newbie
*
Posts: 6


View Profile Email
« on: July 30, 2008, 07:06:41 am »

Hi, I'm new with crystalspace and compiled it successfully with Mingw and Msys using jam.

Now, I'm trying to compile the simple2 tutorial app as a new project in Eclipse-CDT, but I always get the same errors:
Code:
**** Build of configuration Debug for project crystaltest ****

**** Internal Builder is used for build               ****
g++ ..\simple2.cpp -DCS_WIN32_CSCONFIG -D__CRYSTAL_SPACE__ -DCS_DEBUG -IC:\msys\1.0\local\include\crystalspace-1.2 -O0 -g3 -Wall -c -fmessage-length=0 -osimple2.o
In file included from C:/msys/1.0/local/include/crystalspace-1.2/csgeom/box.h:34,
                 from C:/msys/1.0/local/include/crystalspace-1.2/csgeom.h:25,
                 from C:/msys/1.0/local/include/crystalspace-1.2/crystalspace.h:27,
                 from ..\simple2.h:22,
                 from ..\simple2.cpp:20:
C:/msys/1.0/local/include/crystalspace-1.2/csgeom/math.h:140:2: #error Your platform has no isfinite()-alike function!
In file included from C:/msys/1.0/local/include/crystalspace-1.2/csgeom/box.h:34,
                 from C:/msys/1.0/local/include/crystalspace-1.2/csgeom.h:25,
                 from C:/msys/1.0/local/include/crystalspace-1.2/crystalspace.h:27,
                 from ..\simple2.h:22,
                 from ..\simple2.cpp:20:
C:/msys/1.0/local/include/crystalspace-1.2/csgeom/math.h: In function `bool csFinite(float)':
C:/msys/1.0/local/include/crystalspace-1.2/csgeom/math.h:142: warning: no return statement in function returning non-void
C:/msys/1.0/local/include/crystalspace-1.2/csgeom/math.h:155:2: #error Your platform has no isfinite()-alike function!
C:/msys/1.0/local/include/crystalspace-1.2/csgeom/math.h: In function `bool csFinite(double)':
C:/msys/1.0/local/include/crystalspace-1.2/csgeom/math.h:157: warning: no return statement in function returning non-void
C:/msys/1.0/local/include/crystalspace-1.2/csgeom/math.h:171:2: #error Your platform has no isnan()-alike function!
C:/msys/1.0/local/include/crystalspace-1.2/csgeom/math.h: In function `bool csNaN(float)':
C:/msys/1.0/local/include/crystalspace-1.2/csgeom/math.h:173: warning: no return statement in function returning non-void
C:/msys/1.0/local/include/crystalspace-1.2/csgeom/math.h:184:2: #error Your platform has no isnan()-alike function!
C:/msys/1.0/local/include/crystalspace-1.2/csgeom/math.h: In function `bool csNaN(double)':
C:/msys/1.0/local/include/crystalspace-1.2/csgeom/math.h:186: warning: no return statement in function returning non-void
Build error occurred, build is stopped
Time consumed: 3406  ms. 

I tried many different configurations, but always get those same errors.
My current configuration (in Project -> Properties -> C/C++ Build) is:

In Environment:
   Added environment variable CRYSTAL = C:\CS
In Settings:
   In GCC C++ Compiler
      Preprocessor -> Defined symbols (-D) :

         CS_WIN32_CSCONFIG
         __CRYSTAL_SPACE__
         CS_DEBUG
      Directories -> Include Paths (-I):
         "C:\msys\1.0\local\include\crystalspace-1.2"
   In MinGW C++ Linker
      Libraries (-l):

         crystalspace
         crystalspace_windows
         crystalspace_opengl
         crystalspace_directx
      Library search path (-L)
         "C:\msys\1.0\local\lib\crystalspace-1.2"
         "C:\CrystalSpaceLibs\mingw\lib"
         "C:\CrystalSpaceLibs\common\lib"

Those are the only settings I modified in my project. All the other settings are at their Eclipse default.

I tried to use the config found here: http://www.crystalspace3d.org/forum/index.php/topic,850.0.html , but I was never able to use cs-config with eclipse. I kept telling me that cs-config was not found anywhere I put it or pointed to it in the settings.
Finally, I just took the output of the command in msys and put the informations directly in my eclipse project settings.
I also tried to use "crystalspace-1.2, crystalspace_windows-1.2, ..." for the libraries names, but it changed nothing.

Anyone know the cause of the error I get or can tell me what I did wrong in my config?
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #1 on: July 30, 2008, 07:18:06 am »

I'm not sure you should be using the CS_WIN32_CSCONFIG define. Actually I'm pretty sure that you shouldn't use that at all. Why are you adding that? In any case, a good way to find out what flags to use is to use the cs-config script that is built with CS. For example. On my system:

Code:
$ ./cs-config --cxxflags
 -I./include     

So run cs-config with -cxxflags and you can see what options to use.

Greetings,
Logged
Caposite
Newbie
*
Posts: 6


View Profile Email
« Reply #2 on: July 30, 2008, 11:00:08 am »

I'm not sure you should be using the CS_WIN32_CSCONFIG define. Actually I'm pretty sure that you shouldn't use that at all. Why are you adding that? In any case, a good way to find out what flags to use is to use the cs-config script that is built with CS. For example. On my system:

Code:
$ ./cs-config --cxxflags
 -I./include     

So run cs-config with -cxxflags and you can see what options to use.

Greetings,

I used CS_WIN32_CSCONFIG because I saw it was used in the manual in the part about configuring MSVC for crystalspace. I thought it could maybe fix my problem. Here is the part where I saw it:

Quote
Crystal Space essentially has three preprocessor definitions which MUST be set in-order to successfully compile and link your application. They are ‘CS_WIN32_CSCONFIG’, which is added whether the build is release or debug. ‘__CRYSTAL_SPACE__’, which is also set whether the build is release or debug. And finally ‘CS_RELEASE’ or ‘CS_DEBUG’, which is added as you may guess ‘CS_RELEASE’ in the settings for release builds and ‘CS_DEBUG’ in the settings for debug builds.

For the flags, I executed this command in msys before, this is how I could get all the paths for the libs and headers, and the libraries to use, but even if I follow perfectly the outputs of cs-config, I still get the same error over and over again. The error seems to say I have no isfinite or isnan like functions on my platform, and I don't know why.

Anyways, I'll try other configurations when I'll have the time, and if it really doesn't work, I'll just install dev-cpp or Visual Studio Express and see if I have more luck with them.

Thanks anyway for the help.

Edit:
Just saw the sticky, here are more informations about my configuration:
CS version: 1.2.1
winlibs version: 1.2_002
Operating System: Windows XP Pro SP2 (French Edition)
Compiler: GCC 3.4.5 in MingW32 5.1.4 and MSYS 1.0.10
Video Card: Nvidia Geforce 8600M GT
Driver version: 156.83
« Last Edit: July 30, 2008, 11:11:39 am by Caposite » Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #3 on: July 30, 2008, 11:42:56 am »

Yes, but that information is specifically for MSVC and not suitable for Mingw/msys.

Greetings,
Logged
Caposite
Newbie
*
Posts: 6


View Profile Email
« Reply #4 on: July 30, 2008, 07:05:58 pm »

Ok, removed CS_WIN32_CSCONFIG and made sure all my lib and header paths were correct with cs-config. Now, I get a different error:

Code:
**** Build of configuration Release for project crystaltest ****

**** Internal Builder is used for build               ****
g++ simple2.o -lcrystalspace_windows-1.2 -lcrystalspace_opengl-1.2 -lcrystalspace_directx-1.2 -lcrystalspace-1.2 -lzlib -lddraw -ldsound -ldinput -lopengl32 -lm -LC:\msys\1.0\local\lib -LC:\CrystalSpaceLibs\mingw\lib -LC:\CrystalSpaceLibs\common\lib -ocrystaltest.exe
C:\msys\1.0\local\lib/libcrystalspace-1.2.a(win32.o): In function `ZN14Win32AssistantC1EP15iObjectRegistry':
c:/CS/libs/csutil/win32/win32.cpp:465: undefined reference to `_imp__GetStockObject@4'
C:\msys\1.0\local\lib/libcrystalspace-1.2.a(win32.o): In function `ZN14Win32AssistantC2EP15iObjectRegistry':
c:/CS/libs/csutil/win32/win32.cpp:465: undefined reference to `_imp__GetStockObject@4'
collect2: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 7532  ms. 


Any ideas?
Logged
Caposite
Newbie
*
Posts: 6


View Profile Email
« Reply #5 on: July 31, 2008, 09:23:51 am »

Today, I tried to compile simple2 with dev-cpp instead of eclipse, but I get the same error:

Code:
Compiler: MinGW
Building Makefile: "C:\Data\workspace\Makefile.win"
Executing  make...
make.exe -f "C:\Data\workspace\Makefile.win" all
g++.exe -c crystaltest/simple2.cpp -o crystaltest/simple2.o -I"C:/MinGW/include/c++"  -I"C:/CS/include"  -IC:/msys/1.0/local/include/crystalspace-1.2 
g++.exe crystaltest/simple2.o  -o "crystaltest.exe" -L"C:/MinGW/lib" -LC:/CS/out/msysx86/optimize/libs -lcrystalspace_windows-1.2 -lcrystalspace_opengl-1.2 -lcrystalspace_directx-1.2  -lcrystalspace-1.2   -lzlib  -lddraw  -ldsound  -ldinput  -lopengl32  -lm   -LC:/CrystalSpaceLibs/mingw-gcc-3.4/lib  -LC:/CrystalSpaceLibs/mingw/lib  -LC:/CrystalSpaceLibs/common/lib  -lm 
C:/CS/out/msysx86/optimize/libs/libcrystalspace-1.2.a(win32.o): In function `ZN14Win32AssistantC1EP15iObjectRegistry':
c:/CS/libs/csutil/win32/win32.cpp:465: undefined reference to `_imp__GetStockObject@4'
C:/CS/out/msysx86/optimize/libs/libcrystalspace-1.2.a(win32.o): In function `ZN14Win32AssistantC2EP15iObjectRegistry':
c:/CS/libs/csutil/win32/win32.cpp:465: undefined reference to `_imp__GetStockObject@4'
collect2: ld returned 1 exit status

make.exe: *** [crystaltest.exe] Error 1
Execution terminated

That means my IDE is not the problem. Maybe my way of linking to the libraries is wrong or my MinGW has a problems, but that last one is unlikely because I successfully compiled CS with it and all the demos work.
I'm still trying to find what could be the cause of this problem. Maybe I'll try to compile CS with Visual C++ Express tomorrow and see if it works better there...
« Last Edit: July 31, 2008, 09:27:01 am by Caposite » Logged
Caposite
Newbie
*
Posts: 6


View Profile Email
« Reply #6 on: August 01, 2008, 01:51:00 am »

Today, I tried to compile the same program again, but in Visual C++ 2008.
The compilation of crystalspace itself kinda worked, but it compiled only the release libs. I used the project files in the msvc8 directory and Visual C++ did some project file conversion and it compiled.

Then, I followed the instructions in the manual and started a new MSVC project based on simple2, but now I get compilation errors again:

Code:
1>------ Rebuild All started: Project: crystaltest, Configuration: Release Win32 ------
1>Deleting intermediate and output files for project 'crystaltest', configuration 'Release|Win32'
1>Compiling...
1>simple2.cpp
1>c:\cs\include\cstypes.h(38) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
1>Build log was saved at "file://c:\Data\crystaltest\crystaltest\crystaltest\Release\BuildLog.htm"
1>crystaltest - 1 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

I thought it was a problem with platformSDK, but I read that platformSDK is included with Visual C++ 2008.
Now I don't know what to do... I tried 3 different IDEs and 2 different compilers, and I still can't compile a custom project. I managed to compile and use crystalspace successfully in Linux with Eclipse some time ago, but now I can't make it work in windows.

If anybody encountered the same problems as me, or have any idea of a solution to my problem, please help.
Logged
Caposite
Newbie
*
Posts: 6


View Profile Email
« Reply #7 on: August 02, 2008, 02:21:01 am »

Tried to compile simple1 with cygwin instead of mingw in eclipse, and I now get a new error:

Code:
**** Build of configuration Release for project crystaltest ****

make all
Building file: ../simple1.cpp
Invoking: Cygwin C++ Compiler
g++ -D__CRYSTAL_SPACE__ -DCS_RELEASE -I"C:\CS\include" -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"simple1.d" -MT"simple1.d" -o"simple1.o" "../simple1.cpp"
Finished building: ../simple1.cpp
 
Building target: crystaltest.exe
Invoking: Cygwin C++ Linker
g++ -L"C:\CS\out\msysx86\optimize\libs" -L"C:\CrystalSpaceLibs\common\lib" -L"C:\CrystalSpaceLibs\mingw\lib" -L"C:\cygwin\usr\local\lib" -o"crystaltest.exe"  ./simple1.o   -lcrystalspace_windows-1.2 -lcrystalspace_opengl-1.2 -lcrystalspace_directx-1.2 -lcrystalspace-1.2 -lddraw -ldsound -ldinput -lopengl32 -lm -ldl -lzlib
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(initapp.o): In function `_ZN13csInitializer8SetupVFSEP15iObjectRegistryPKc':
/cygdrive/c/CS/libs/cstool/initapp.cpp:265: undefined reference to `__imp___iob'
/cygdrive/c/CS/libs/cstool/initapp.cpp:267: undefined reference to `__imp___iob'
/cygdrive/c/CS/libs/cstool/initapp.cpp:268: undefined reference to `__imp___iob'
/cygdrive/c/CS/libs/cstool/initapp.cpp:269: undefined reference to `__imp___iob'
/cygdrive/c/CS/libs/cstool/initapp.cpp:275: undefined reference to `__imp___iob'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(initapp.o):/cygdrive/c/CS/libs/cstool/initapp.cpp:278: more undefined references to `__imp___iob' follow
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(initapp.o): In function `_ZN13csInitializer17CreateEnvironmentEiPKPKc':
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:98: undefined reference to `__stricmp'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:98: undefined reference to `__stricmp'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(winprintf.o): In function `_Z12csPrintfErrVPKcPc':
/cygdrive/c/CS/libs/csutil/win32/winprintf.cpp:268: undefined reference to `__imp___iob'
/cygdrive/c/CS/libs/csutil/win32/winprintf.cpp:323: undefined reference to `__imp___iob'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(winprintf.o): In function `_Z11csPrintfErrPKcz':
/cygdrive/c/CS/libs/csutil/win32/winprintf.cpp:268: undefined reference to `__imp___iob'
/cygdrive/c/CS/libs/csutil/win32/winprintf.cpp:323: undefined reference to `__imp___iob'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(winprintf.o): In function `_Z9csPrintfVPKcPc':
/cygdrive/c/CS/libs/csutil/win32/winprintf.cpp:268: undefined reference to `__imp___iob'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(winprintf.o):/cygdrive/c/CS/libs/csutil/win32/winprintf.cpp:307: more undefined references to `__imp___iob' follow
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(util.o): In function `_Z12csStrCaseCmpPKcS0_':
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:98: undefined reference to `__stricmp'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(util.o): In function `_Z13csStrNCaseCmpPKcS0_j':
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:105: undefined reference to `__strnicmp'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(csstring.o): In function `_ZN12csStringBase5LTrimEv':
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/ctype.h:162: undefined reference to `__imp___pctype'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/ctype.h:162: undefined reference to `__isctype'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(csstring.o): In function `_ZN12csStringBase5RTrimEv':
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/ctype.h:162: undefined reference to `__imp___pctype'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/ctype.h:162: undefined reference to `__isctype'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(csstring.o): In function `_ZN12csStringBase4TrimEv':
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/ctype.h:162: undefined reference to `__imp___pctype'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/ctype.h:162: undefined reference to `__isctype'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/ctype.h:162: undefined reference to `__imp___pctype'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/ctype.h:162: undefined reference to `__isctype'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(csstring.o): In function `_ZN12csStringBase8CollapseEv':
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/ctype.h:162: undefined reference to `__imp___pctype'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/ctype.h:162: undefined reference to `__isctype'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(csstring.o): In function `_ZN12csStringBase6InsertEjRKS_':
/cygdrive/c/CS/libs/csutil/csstring.cpp:134: undefined reference to `__errno'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(win32.o): In function `_ZN14Win32Assistant14DisableConsoleEv':
/cygdrive/c/CS/./include/csutil/csstring.h:807: undefined reference to `__imp___iob'
/cygdrive/c/CS/./include/csutil/csstring.h:807: undefined reference to `__imp___iob'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(win32.o): In function `_ZN14Win32Assistant8ShutdownEv':
/cygdrive/c/CS/libs/csutil/win32/win32.cpp:589: undefined reference to `__imp___iob'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(win32.o): In function `_ZN14Win32AssistantC1EP15iObjectRegistry':
/cygdrive/c/CS/libs/csutil/win32/win32.cpp:465: undefined reference to `__imp__GetStockObject@4'
/cygdrive/c/CS/libs/csutil/win32/win32.cpp:405: undefined reference to `__imp___iob'
/cygdrive/c/CS/libs/csutil/win32/win32.cpp:403: undefined reference to `__imp___iob'
/cygdrive/c/CS/libs/csutil/win32/win32.cpp:407: undefined reference to `__imp___iob'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(win32.o): In function `_ZN14Win32AssistantC2EP15iObjectRegistry':
/cygdrive/c/CS/libs/csutil/win32/win32.cpp:465: undefined reference to `__imp__GetStockObject@4'
/cygdrive/c/CS/libs/csutil/win32/win32.cpp:405: undefined reference to `__imp___iob'
/cygdrive/c/CS/libs/csutil/win32/win32.cpp:403: undefined reference to `__imp___iob'
/cygdrive/c/CS/libs/csutil/win32/win32.cpp:407: undefined reference to `__imp___iob'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(cfgmgr.o): In function `_ZN17scfImplementationI14scfStringArrayED1Ev':
/cygdrive/c/CS/./include/cssysdef.h:(.text$_ZNK23csConfigManagerIterator7GetBoolEv[csConfigManagerIterator::GetBool() const]+0x29): undefined reference to `__stricmp'
/cygdrive/c/CS/./include/cssysdef.h:(.text$_ZNK23csConfigManagerIterator7GetBoolEv[csConfigManagerIterator::GetBool() const]+0x4e): undefined reference to `__stricmp'
/cygdrive/c/CS/./include/cssysdef.h:(.text$_ZNK23csConfigManagerIterator7GetBoolEv[csConfigManagerIterator::GetBool() const]+0x68): undefined reference to `__stricmp'
/cygdrive/c/CS/./include/cssysdef.h:(.text$_ZNK23csConfigManagerIterator7GetBoolEv[csConfigManagerIterator::GetBool() const]+0x82): undefined reference to `__stricmp'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(cfgfile.o): In function `_ZNK12csConfigNode7GetBoolEv':
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:98: undefined reference to `__stricmp'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(cfgfile.o):/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:98: more undefined references to `__stricmp' follow
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(cfgfile.o): In function `_ZNK16csConfigIterator15CheckSubsectionEPKc':
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:105: undefined reference to `__strnicmp'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(cfgfile.o): In function `_ZN16csConfigIterator4NextEv':
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:105: undefined reference to `__strnicmp'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(cfgfile.o): In function `_ZN16csConfigIterator4PrevEv':
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:105: undefined reference to `__strnicmp'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(cfgfile.o): In function `_ZNK16csConfigIterator7GetBoolEv':
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:98: undefined reference to `__stricmp'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:98: undefined reference to `__stricmp'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:98: undefined reference to `__stricmp'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:98: undefined reference to `__stricmp'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(cfgfile.o): In function `_ZNK12csConfigFile8FindNodeEPKcb':
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:105: undefined reference to `__strnicmp'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:98: undefined reference to `__stricmp'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(cfgfile.o): In function `_ZNK12csConfigFile7GetBoolEPKcb':
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:98: undefined reference to `__stricmp'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:98: undefined reference to `__stricmp'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:98: undefined reference to `__stricmp'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:98: undefined reference to `__stricmp'
C:\CS\out\msysx86\optimize\libs/libcrystalspace-1.2.a(cfgfile.o):/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/string.h:98: more undefined references to `__stricmp' follow
...
collect2: ld returned 1 exit status
make: *** [crystaltest.exe] Error 1

I think all the errors I got might be related, but I still don't know what is causing them or what I could do to successfully compile a simple CS program without errors.
I'm using a french version of Windows, so I don't know if that could be a cause of my problems.
Please someone help!
Logged
Newton64
Newbie
*
Posts: 21


View Profile Email
« Reply #8 on: November 29, 2008, 06:11:51 pm »

If no one minds, I'd like to bump this one. I've got the exact same problem.
Logged
res
Develazyoper
CS Developer
Full Member
*****
Posts: 206


View Profile Email
« Reply #9 on: November 29, 2008, 06:34:24 pm »

Tried to compile simple1 with cygwin instead of mingw in eclipse, and I now get a new error:

You can't mix binaries compiled with mingw and cygwin. They build against different runtime libraries, and what you see is what you get when you mix code for different runtimes.
Logged
res
Develazyoper
CS Developer
Full Member
*****
Posts: 206


View Profile Email
« Reply #10 on: November 29, 2008, 06:36:37 pm »

Code:
C:\msys\1.0\local\lib/libcrystalspace-1.2.a(win32.o): In function `ZN14Win32AssistantC1EP15iObjectRegistry':
c:/CS/libs/csutil/win32/win32.cpp:465: undefined reference to `_imp__GetStockObject@4'

Any ideas?

You need to link against gdi32 (-lgdi32 linker option).
« Last Edit: November 29, 2008, 06:41:03 pm by res » Logged
res
Develazyoper
CS Developer
Full Member
*****
Posts: 206


View Profile Email
« Reply #11 on: November 29, 2008, 06:38:36 pm »

If anybody encountered the same problems as me, or have any idea of a solution to my problem, please help.

Is it possible you this time did not specify the CS_WIN32_CSCONFIG preprocessor definition?
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 9.401 seconds with 14 queries.