User forums > General (but related to Code::Blocks)
Portability Question )
Tjaalie:
I have a problem with the fact that the SDK uses -export-all-symbols, the ms compiler doesn't have a parameter like this
so I can build the codeblocks.dll but not all the needed stuff is exported, im working on a tool that will extract all this info
from a .obj and then add it to a .def file. So I got all build targets working till 'src' wich fails on linking becouse of the fact that
not everything is exported.
JGM:
--- Quote from: Tjaalie on August 30, 2007, 05:10:09 pm ---I have a problem with the fact that the SDK uses -export-all-symbols, the ms compiler doesn't have a parameter like this
so I can build the codeblocks.dll but not all the needed stuff is exported, im working on a tool that will extract all this info
from a .obj and then add it to a .def file.
--- End quote ---
I don't know if this works PEEXPORT.EXE, it extract info that you can output to some .def file. You can find that tool on the Walk32 package. Here is a download location: http://www.programmersheaven.com/download/355/download.aspx
Tjaalie:
Does this suport .obj (COFF) files?
Becouse I can't test it becouse I have a 64bit system and it complains that
this is not a a 64 exe, while code blocks another 32 bit exe works fine.
But I found a very usefull document on MSDN,
http://www.microsoft.com/whdc/system/platform/firmware/PECOFFdwn.mspx
Tjaalie:
Owke I managed to extract the symbol names from the .obj file.
But the contents seems a bit cryptic, the names are there but I fail to understand all the other stuff inside the name.
And of course when you declerate it as something else as the standard __thiscall (if I recall correct) it will be totaly different (correct?).
But if there is a realy smart guy floating around here that is willing to give me a hand at this stuff here is the output (so far).
--- Quote ---Crc32.obj (from sdk/Crc32.cpp)
??_EwxString@@QAEPAXI@Z
??3@YAXPAX@Z
??_V@YAXPAX@Z
??_M@YGXPAXIHP6EX0@Z@Z
?FromFile@wxCrc32@@YAIABVwxString@@@Z
__unwindfunclet$?FromFile@wxCrc32@@YAIABVwxString@@@Z$1
__unwindfunclet$?FromFile@wxCrc32@@YAIABVwxString@@@Z$0
?cbReadFileContents@@YA?AVwxString@@AAVwxFile@@W4wxFontEncoding@@@Z
__ehhandler$?FromFile@wxCrc32@@YAIABVwxString@@@Z
___CxxFrameHandler3
@__security_check_cookie@4
?FromString@wxCrc32@@YAIABVwxString@@@Z
?GetCRC32Table@@YAPAIPAI@Z
??_U@YAPAXI@Z
--- End quote ---
In the mean time I will google my **s off.
So far I think the double '?' must be ignored and and the single '?' contain the usefull stuff, I'm going to write a simple extractor but I would like to know what the rubbish at the end of the name does?
EDIT:
No Problem(tm) I already found it out. You only want the ones with ? in front and read till a @ is it a double class name follows, else parameter trash follows. Its realy easy I'm gonne finish the tool now, if anyone is intrested I can post the source+binary, its a realy handy tool if you want to export all functions and classes from a vc++ dll but don't want to create a .def file by hand, all you need is all the .obj files.
Tjaalie:
The tool is ready, I will upload it here.
Its one big hacked togetter c and c++ mixture so don't expect to feel happy when you look at the code.
Usage '"OBJ2DEF [obj file] [def file] [0=overwrite 1=apend]"
The only thing you need to do after you used this app is add the following lines
infront of your generated .def file:
--- Code: ---LIBRARY [YourDllNameHere]
EXPORTS
--- End code ---
[attachment deleted by admin]
Navigation
[0] Message Index
[*] Previous page
Go to full version