|
|
|
|
#1 |
|
Senior Member
Join Date: Oct 2006
Posts: 106
|
Cannot open libc.lib
I'm trying to compile a plugin using Visual Studio 2008, but I get the following error message:
LINK : fatal error LNK1104: cannot open file 'LIBC.lib' How do I solve this? I don't see libc.lib included anywhere, so I don't even know why it's looking for it... |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
2008 is not supported by SCons. See some recent threads on the subject.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Oct 2006
Posts: 106
|
I know. I'm not using SCons. I'm trying to compile a third-party plugin.
|
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
If you're importing a dsp file, remove the libc reference and use the flags in C/C++ properties page (/MT, /MD, etc.).
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Oct 2006
Posts: 106
|
I converted/imported the ExDll project from v2.42. I searched through all files, libc.lib is not included anywhere. I tried both /MT and /MD, both give the same result. (Cannot open libc.lib)
I think it's the provided pluginapi.lib file that depends on libc.lib. Is there anything I can do about that? |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Sep 2007
Posts: 204
|
You do not need libc.lib with VS 2008. It is implied and links without an explicit libc.lib reference. Remove it from the project.
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source. |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Oct 2006
Posts: 106
|
From what project? My project (ExDll) does not include libc.lib anywhere.
|
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Sep 2007
Posts: 204
|
Are you compiling via a VS 2008 project or via Scons?
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source. |
|
|
|
|
|
#9 |
|
Senior Member
Join Date: Oct 2006
Posts: 106
|
VS 2008 project
|
|
|
|
|
|
#10 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
The plug-in library is requesting libc.lib for an unknown reason. I will check it out. You should open a bug report for it.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#11 |
|
Senior Member
Join Date: Oct 2006
Posts: 106
|
|
|
|
|
|
|
#12 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
I've looked a bit more into it and all files contain that reference. It's the /NODEFAULTLIB flag that cancels them. You should use that flag with VS2008 too and it should work. I don't know how it's called in the GUI but it should be under Linker in Project Settings. Maybe Ignore Default Libraries or something similar.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#13 |
|
Senior Member
Join Date: Oct 2006
Posts: 106
|
This is the output with /NODEFAULTLIB turned on:
code: |
|
|
|
|
|
#14 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
specify DllMain as the entry point
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#15 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
And get rid of all the safety checks.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#16 |
|
Senior Member
Join Date: Oct 2006
Posts: 106
|
So I manually defined the entry point and disabled "Buffer Security Check" (/GS-).
I'm now down to the following error messages: code: |
|
|
|
|
|
#17 |
|
Senior Member
Join Date: Oct 2006
Posts: 106
|
Got rid of the last errors by setting "Basic Runtime Checks" to "Default" in the project properties.
|
|
|
|
|
|
#18 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Could you post the resulting vcproj/sln so I can include it?
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#19 |
|
Senior Member
Join Date: Oct 2006
Posts: 106
|
Most certainly
|
|
|
|
|
|
#20 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Thanks.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|