cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Issues with linking and running a 64 bit Pro/TOOLKIT DLL

bbailey
3-Visitor

Issues with linking and running a 64 bit Pro/TOOLKIT DLL



Hi All,

I am working with some code that we purchased from PTC. I am compiling and
linking in Wildfire 4.0 M130 in the MSVS 2005 IDE on a Win XP 32 bit
laptop. My targets are Windows XP, 32 and 64 bit platforms.

The DLL compiles, links and runs fine for 32 bit XP. When I initially
tried linking for 64 bit I got linker errors indicating that the module
target of x86 was incompatible with the target machine x64. Investigating,
I found that the 64 bit Properties included paths with "(x86)". I assumed
that it had been built on a 64 bit machine. The odd part was that the
paths had been set in the Additional Libraries section of the properties
dialog for the project. I ended up having to adjust the path to point to
the amd64 library folder under the VC 8 SDK. The code now compiles and
links fine, but when I attempt to start it on a Win 64 box, I get the
failed to start dialog. No error messages in either the message log, trail
file, or std.out. I have an old version of the DLL that starts fine in the
same set up, so I know that part is OK.

I ended up adding dependencies to msvcrtd.lib and msvcprtd.lib and using
the /NODEFAULTLIB linker option.

Anybody ever seen this sort of thing before?

Thanks,

Ben

This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
6 REPLIES 6

You can't link and compile code for 64 bit with a 32 bit Laptop. You only can crosscompile upward. So a 64 bit can compile 32 bit, but a 32 bit can't compile 64 bit applications.



Best regards,


Eike

Hi,


If you are compiling with 32 bit machine compiling 64 bit dll, you will need to check 64-bit compatblity option, While installing Visual Studio, please select the corresponding option, additionally some more stuffs will be installed, you have to check the compiler linker options also.


It is very much possible to compile 64 bit dll from 32 bit machine, and we do.



Regards,


Joseph

Hi,
If you are compiling with 32 bit machine compiling 64 bit dll, you will
need to check 64-bit compatblity option, While installing Visual Studio,
please select the corresponding option, additionally some more stuffs will
be installed, you have to check the compiler linker options also.
It is very much possible to compile 64 bit dll from 32 bit machine, and we
do.

Regards,
Joseph



Oh yeah, you're right Joseph,


I think cross compiling at Windows is not possible. But I'm suprrised that is, and that Visual Studio has the support inside.


http://msdn.microsoft.com/en-us/library/x4d2c09s.aspx


I found this on msdn, possible it's interesting for you. A very interesting topic : )


Best Regards,


Eike

bbailey
3-Visitor
(To:bbailey)


Hi All,

Well, after some pointers and a bit of Three Stooges Engineering (Push
Buttons...), I simply moved to the Release state of the project and the
thing now runs like a champ.

I am thinking the library linking for the Debug version is somehow hosed
up.

Not a satisfying solution, but a solution nonetheless...

Ben

Ben,

I have seen cases where other 3rd party libraries do not build or work
properly in debug mode.

Bob Monat
Jerand Technical Services, Inc.
bob@jerand.com
www.jerand.com
1-317-875-6087


Top Tags