User forums > Using Code::Blocks
DirectX 8 & 9
mandrav:
Have you tried linking to a different runtime DLL?
(like multithreaded/release, singlethreaded/release, etc)
Search the forum for the respective flags to use...
grv575:
yeah could you post one of the compile steps as well. the flags determine which C++ library is linked against (e.g. like mandrav pointed out, you can choose under compiler settings which runtime is used, for example multithreaded runtime library will link against LIBCPMT.LIB ). It looks like you're missing stuff from the std:: namespace, so symbols from the C++ runtime.
"The Dark Game SDK is available now. The freeware version costs $60 (€45 / £32)
while the Shareware version costs $200 (€150 / £100). ..."
heh. alrighty.
There's tips about compiling darksdk on this page:
http://homepages.nildram.co.uk/~nickk/html/q___a.html
-----------
You know what also works sometimes when you're looking for imports...
Grab ultraedit (or something that does find in files recursively for a given directory... note windows find doesn't work.. windows find misses a lot of stuff when you do find in files for whatever reason ??? ).
Then do search->find in files
Find: Xlen@_String_base@std
In Files:
Directory: C:\WINDOWS\system32\
Search subdirectories = yes
Running that gives you:
--- Code: -------------------------------------------
Find 'Xlen@_String_base@std' in 'C:\WINDOWS\system32\msvcp70.dll' :
C:\WINDOWS\system32\msvcp70.dll(2620): @?$ctype@G@std@@QBEGG@Z
Found 'Xlen@_String_base@std' 1 time(s).
----------------------------------------
Find 'Xlen@_String_base@std' in 'C:\WINDOWS\system32\msvcp71.dll' :
C:\WINDOWS\system32\msvcp71.dll(1528): shift@?$codecvt@GDH@std@@QBEHAAHPAD1AAPAD@Z
Found 'Xlen@_String_base@std' 1 time(s).
----------------------------------------
Find 'Xlen@_String_base@std' in 'C:\WINDOWS\system32\msvcp71d.dll' :
C:\WINDOWS\system32\msvcp71d.dll(2757): @std@@
Found 'Xlen@_String_base@std' 1 time(s).
Error reading file 'C:\WINDOWS\system32\config\default'!!!
Error reading file 'C:\WINDOWS\system32\config\default.LOG'!!!
Error reading file 'C:\WINDOWS\system32\config\SAM'!!!
Error reading file 'C:\WINDOWS\system32\config\SAM.LOG'!!!
Error reading file 'C:\WINDOWS\system32\config\SECURITY'!!!
Error reading file 'C:\WINDOWS\system32\config\SECURITY.LOG'!!!
Error reading file 'C:\WINDOWS\system32\config\software'!!!
Error reading file 'C:\WINDOWS\system32\config\software.LOG'!!!
Error reading file 'C:\WINDOWS\system32\config\system'!!!
Error reading file 'C:\WINDOWS\system32\config\system.LOG'!!!
Search complete, found 'Xlen@_String_base@std' 3 time(s). (3 files.)
--- End code ---
If you then run dependency walker (platform sdk tools) on msvcp71.dll you should see you're symbols that you're missing.
So it looks like you may _need_ to link against msvcp71.dll (I haven't checked the static lib for the symbols but it may / may not work). So try linking against that (you'll need a msvcp71.lib file: see
http://forums.codeblocks.org/index.php/topic,821.msg5668.html#msg5668
steps 4&5 for directions on building it). It's worth noting that if libraries you link against use the runtime dll this doesn't mix (I don't think) with trying to use the static runtime dll (libc.lib) so that you may have to link against the dll runtime...
mandrav:
Now that grv575 mentions it, I recall a similar problem being solved by adding libcp.lib in link libs...
MrTAToad:
It wasn't solved by linking in libcp.lib unfortunately.
I've tried linking in single and multi-thread library (both release and debug).
Unfortunately whilst linking with the VS7 library files would be ideal, unfortunately the idea of trying to use code::blocks with DarkSDK is to allow those who are too poor to stump up £70 for it to use the SDK. And to be honest anything that cant be used out of the box would be too complicated for a lot of people.
--- Quote ---There's tips about compiling darksdk on this page:
http://homepages.nildram.co.uk/~nickk/html/q___a.html
--- End quote ---
I wrote that and its for Visual Studio 2003. Considering that I closed my Nildram account down 2 months ago, I can still access everything there.
grv575:
masm32 (an assembler distribution that uses ms ml.exe, link.exe) gets around this by generating the .lib file on installation. they have .inc include headers which detail the symbols found in the windows system dlls and then a custom program generated .lib file using this information.
what you could do is include a mingw compiled sed program. then just create a batch file that accepts an dllname as an argument and generates the .lib file according to that exports_alt.sed script. just tell users to click on the script to generate the lib file for them and have it put the .lib file somewhere in the path for them.
So if you want to pursue this, grab sed.exe at:
http://prdownloads.sourceforge.net/gnuwin32/sed-4.1.4.exe
Here's the exports_alt.sed script:
-----cut here---------
# echo LIBRARY msvcp71.dll > msvcprt.def
# echo EXPORTS >> msvcprt.def
# link -dump -exports msvcp71.dll | sed -nf exports_alt.sed >> msvcprt.def
# link -lib -machine:X86 -def:msvcprt.def -out:msvcprt.lib
#
/[ \t]*ordinal hint/,/^[ \t]*Summary/{
/^[ \t]\+[0-9]\+/{
s/^[ \t]\+[0-9]\+[ \t]\+[0-9A-Fa-f]\+[ \t]\+[0-9A-Fa-f]\+[ \t]\+\(.*\)/\1/p
}
}
-----cut here---------
Note the line endings in exports_alt.sed must be unix line endings (just LF, not CR/LF).
So either run dos2unix.exe on the file after cuting and pasting the above to a file, or use a text
editor which supports unix line endings (e.g. ultraedit).
Here's the dll2lib.bat batch script:
-----cut here---------
@echo off
REM call with dll2lib dll_basename lib_basename
REM e.g. dll2lib msvcp71 msvcprt
REM will look for msvcp71.dll in the current directory
REM and produce msvcprt.lib in the current directory
REM alt_exports.sed needs to be in the current directory
REM sed.exe (and libiconv2.dll, libintl3.dll) from gnuwin32 need to be in the PATH
set PATH="C:\Program Files\Microsoft Platform SDK\Bin\win64";%PATH%
echo LIBRARY %1.dll > %2.def
echo EXPORTS >> %2.def
link -dump -exports %1.dll | sed -nf exports_alt.sed >> %2.def
link -lib -machine:X86 -def:%2.def -out:%2.lib
-----cut here---------
This assumes you bundle sed.exe, the two lib files it needs (libiconv2.dll, libintl3.dll) which are in the same directory as sed.exe installs to, and that Platform SDK is installed on the user's machine. Then they just run
dll2lib msvcp71 msvcprt
to produce the msvcprt.lib file that's needed to link "Multi-threaded DLL Runtime Library".
---
Btw, I figure out the error message you were getting with _Xlen. This is a custom MS extension to the C++ library. The include files are in C:\Program Files\Microsoft Platform SDK\Include\crt
Specifically, see the file "xstring" in that dir. The dll which defines these functions is the microsoft runtime library (msvcrpt*.dll or msvcrt*.dll). So it is necessary to use the MS runtime for this. The standard C library doesn't look like it provides the crt extensions.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version