User forums > Help
Compile errors
JustinThyme:
I just downloaded and installed Code::Blocks, and so far, it looks amazing! Before I get to my problem (which I think I already know the answer to), please let me say thanks for your hard work in providing a great free tool!
Anyway, I installed CB and MinGW (into default directories). One HUGE benefit that CB seems to have is importing projects from different formats. I have MSVC6.0, but there are some .vcproj's I'd like to use, but the available conversion utilities leave much to be desired.
For a point of reference, the project in question is a port of the Quake game engine.
The import seems to go fine. I go into the project options and ensure MinGW is selected, and the directories are correct. On compile I was just seeing several red errors, and it wouldn't compile. I thought there might be a config error, but I created a generic win32 shell, and it compiled fine. I went back to the game project and tried it again. On closer inspection, one of the errors was something like:
"winsock.lib not found"
Sure enough, it isn't in the MinGW libraries. So I'm assuming I need to install the MS Windows Platform SDK. Correct?
As I'm a hobbyist, and not a programmer, another silly question. Is the VC2003Toolkit strictly .NET based, or will it compile traditional C++ code? I have the Toolkit, and could go that route as well.
mike:
VCToolkit 2003 is a C/C++ compiler and linker, usually delivered with MSVS .NET 2003, along with some necessary libraries (kernel32.lib and libc.lib in different flavours). So "vcproj", being a C/C++ project, shall compile just fine.
I am afraid I cannot answer you proficiently on the "winsock" question, but my guess is that even if you get the library with Platform SDK, it might not link as the objects produced by MinGW might not be compatible with those produced by VC (which was probably used for "winsock"). But this is just a guess, don't take it for absolute truth :-)
mandrav:
--- Quote from: mike ---I am afraid I cannot answer you proficiently on the "winsock" question, but my guess is that even if you get the library with Platform SDK, it might not link as the objects produced by MinGW might not be compatible with those produced by VC (which was probably used for "winsock"). But this is just a guess, don't take it for absolute truth :-)
--- End quote ---
mike is right. Even if you get the Platform SDK, gcc will probably not link with these libs...
Go to project options and, in linker options, change all xyz.lib entries to -lxyz (e.g. winsock.lib to -lwinsock). If it's using only windows standard libraries, this might get the job done.
Your other option, is to install VC free toolkit and patform SDK and build with it.
Two notes:
a) Quake is cross-platform so it should compile with gcc, easily
b) When you imported the .vcproj, codeblocks should ask you to convert its options to gcc's format (this would convert the libs like above). Didn't it?
Yiannis.
JustinThyme:
Since I do have (but not installed) both the VCToolKit and Platform SDK, it wouldn't both me to install it. But I know other Quake versions compile fine under MinGW, so I assumed this one would too, although there is no mention in it's meager documentation about it.
I'm trying again as I type to make sure my process is correct:
- Open CB
- Go to Project | Import... | MSVS
- Browse to .vcproj and OK
- Select Compiler box select MinGW
- Change command line switches....Yes
- Config to Import....GLRelease|Win32
- Click OK
The project seems to open, but in the browse window, under Workspace, I have the app name, JoeQuake, and then one folder..."Others", which has the assembler code and resources. Normally, under VC, there would be folders for Source, Headers, Resources, External Dependancies, and maybe a couple others.
Here's the output:
--- Quote ---
Project : joequake
Compiler : MinGW Compiler Suite
Directory : C:\Games\Source\joequake\
C:\DOCUME~1\MIKEME~1\LOCALS~1\Temp\cbm1FE.tmp:60: no file name for `-include'
mingw32-g++.exe -o ./release_gl/joequake-gl.exe -LC:/MinGW/bin dxguid.lib opengl32.lib wsock32.lib winmm.lib libpng.lib zlib.lib /incremental /pdb:.\\release_gl/joequake-gl.pdb
mingw32-g++.exe: dxguid.lib: No such file or directory
mingw32-g++.exe: opengl32.lib: No such file or directory
mingw32-g++.exe: wsock32.lib: No such file or directory
mingw32-g++.exe: winmm.lib: No such file or directory
mingw32-g++.exe: /incremental: No such file or directory
mingw32-g++.exe: /pdb:.\release_gl/joequake-gl.pdb: Invalid argument
mingw32-make.exe: *** [release_gl/joequake-gl.exe] Error 1
Process terminated with status 1 (0 minutes, 1 seconds)
0 errors, 0 warnings
--- End quote ---
Tonight I'll probably try installing the MS stuff and see how it goes.
Thanks for the help!
mandrav:
--- Quote ---mingw32-g++.exe -o ./release_gl/joequake-gl.exe -LC:/MinGW/bin dxguid.lib opengl32.lib wsock32.lib winmm.lib libpng.lib zlib.lib
--- End quote ---
You didn't change the libs as I told you...
--- Quote ---Go to project options and, in linker options, change all xyz.lib entries to -lxyz (e.g. winsock.lib to -lwinsock)
--- End quote ---
Do this and remove the linker options "/pdb:.\release_gl/joequake-gl.pdb" and "/incremental". Hopefully, the linking will succeed then...
Yiannis.
Navigation
[0] Message Index
[#] Next page
Go to full version