User forums > Using Code::Blocks
windres embed DLL in resource
(1/1)
DaveHope:
--- Code: ---Hi,
I'm struggling to embed a DLL in a resource (.rc) file. windres complains with:
[code]Compiling: resource.rc
windres.exe: resource.rc:17: syntax error
--- End code ---
From what I can tell, everything is setup correctly. In my header I have:
[code// ID of the embedded DLL.
#define IDR_PKEY_DLL 102[/code]
And then in the rc I have:
--- Code: ---IDR_PKEY_DLL BINARY MOVEABLE PURE “res\\Project.dll”
--- End code ---
I'm pretty sure that's worked with Microsofts resource compiler as part of VC++ (euck!), but not windres. Any ideas?
Thanks,
Dave
stahta01:
--- Quote from: DaveHope on April 06, 2009, 09:19:34 am ---
--- Code: ---IDR_PKEY_DLL BINARY MOVEABLE PURE “res\\Project.dll”
--- End code ---
--- End quote ---
Two suggestions; one of the windres had issues using the folder name res I would try resource name instead
Two, Use the proper double quote character not the smart double quote characters
Regular
--- Code: ---""
--- End code ---
Smart
--- Code: ---“”
--- End code ---
Tim S
DaveHope:
Thanks for the reply Tim.
Sorry for messing up the code tags in the original post, not sure what happened there.
I've removed the res/resource folder altogether, but the problem persists. I've also tried the smart tags as suggested without much luck:
--- Code: ---IDR_PKEY_DLL BINARY MOVEABLE PURE “ProductKeyFinder.dll”
--- End code ---
Still errors with:
--- Code: ---Compiling: resource.rc
windres.exe: C:\\Users\\DAVEHO~1\\Desktop\\2.0\\DEVEL\\resource.rc:17: syntax error
--- End code ---
Any other ideas?
stahta01:
Yeah, use regular quotes NOT smart quotes as I said the first time.
Note: I have never heard of embedding an DLL inside an exe using an resource file; so, I have no idea if it works using MinGW windres.exe.
Tim S
stahta01:
I have gotten it to compile; did not test it it works at runtime.
I added this code to an working rc file.
--- Code: ---#define IDR_TBEHK_DEBUG 130
IDR_TBEHK_DEBUG BINARY MOVEABLE PURE "icudt41.dll"
--- End code ---
I then added the path to the DLL file "icudt41.dll" under this location in Code::Blocks
Project -> Build Options
Tab "search directory"
SubTab "Resource Compiler"
I used a relative path, but an full path should work.
Tim S
Navigation
[0] Message Index
Go to full version