Fatal error LNK1104: cannot open file 'CppUTest.lib'
451 views
Skip to first unread message
Dave Danenberg
unread,
Dec 18, 2015, 7:07:55 PM12/18/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cpputest
Getting cpputest going for first time - using Visual Studio 2010. I know, it looks like I didnt set up the macros or the environment variable correctly. However, I carefully followed the instructions in the WalkThrough doc. Actually deleted and recreated everything a second time. I also went back into the macros and the environment variable - all the paths (names, spelling, syntax, etc) look good.
Anyone else ever run into this?
Dave Danenberg
unread,
Dec 18, 2015, 7:09:39 PM12/18/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cpputest
Btw, running on Windows7 and running the latest cpputest (3.7.1)
Charlie Schultz
unread,
Dec 21, 2015, 7:14:40 AM12/21/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cpputest
Try linking to CppUTestd.lib
James Grenning
unread,
Dec 21, 2015, 9:02:08 AM12/21/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cpputest
Hi Dave
Can you provide the error output?
Is it CppUTest that is not building or your test project that uses
CppUTest? To build CppUTest and run its test, the environment variable
is not needed.
You may get a link error or a copy error. That is due to the project
trying to move the lib to a directory that does not exist.
So, I'm wondering which problem you are trying to fix.
> --
> You received this message because you are subscribed to the Google
> Groups "cpputest" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to cpputest+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
James Grenning
unread,
Dec 21, 2015, 9:09:53 AM12/21/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cpputest
Hi Charlie
That is the right advice. The library name is different than the
project is looking for, and may also be in a different directory.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cpputest
Folks,
Thanks for helping. I did notice that the file in my CppUTest\lib folder is indeed named "CppUTestd.lib" not "CppUTest.lib". I saw that "CppUTestd.lib" gets copied (created?) as part of the build process. So I changed the CPPUTEST_LIB_DEPENDENCIES to "CppUTestd.lib". I also had to change the path name where the project is kept (I had a space in the name of a folder. This was causing and error. Renamed the path to have no spaces).
It now links - and now I get the expected error: Thank you! ...
3>PostBuildEvent:
3>
3>c:\users\ddanenberg\documents\myvsprojects\gameoflife\unittest\myfirsttest.cpp(9): error : Failure in TEST(FirstTestGroup, FirstTest)