March 4th, 2013, 11:44 PM
I'm trying to get a head start on the rest of my concurrent computing course by getting familiar with ThreadMentor, available here , but I'm having some trouble getting it to work. My professor is one of the authors, but he has a habit of ignoring or deflecting both my emails and questions in class.
What I'm working with at home:
Windows 7 Professional 64-bit
Visual Studio 2010
I've followed the directions in item #7 here
However, when I try to build the "Smoker's Problem" project available here
I get the following linker errors:
I did manage to catch up with him after class today and explained my problem. He seems to think that it is because I'm using a 64-bit OS, or at least that was my interpretation of what he said. He also has an unfortunate habit of misinterpreting things that I say, and completely missing the point, so is ThreadMentor just not compatible with my environment or is there some extra steps I need to take?
I'm thinking there might be something else I need to do, or do differently, since his directions are for Visual Studio 2005, and I'm using Visual Studio 2010. I appreciate any confirmation of my professor's statements, or tips on how to get this to work on my home machine.
March 5th, 2013, 03:41 PM
It looks like it may be a linker issue. Do you have ThreadClass.lib on your machine? If so, can VS 2010 find it?
March 5th, 2013, 06:13 PM
Yes, I did download ThreadClass.lib and followed the instructions I said I followed. Yes, I made sure the paths I input in those directions were correct. As to whether or not Visual Studio can find ThreadClass.lib, I don't know but I do know it is on my machine and that I gave the paths correctly in the directions.
Have you tried and successfully built one of the ThreadMentor tutorial projects in a similar environment, or are you just guessing at the problem?
March 5th, 2013, 08:22 PM
Is what I have done. If anyone sees anything I did wrong according to the directions, please let me know. If you can think of anything ELSE I might need to do, that would be great.
March 5th, 2013, 08:24 PM
Initially, I just took an educated guess.
But later, I tried to compile the example and received the same messages. So, I used DumpBin to look at the details of the ThreadClass.lib. They are as follows:
Executing Dumpbin Threadclass.lib /Headers produces the following output:
The machine parm indicates that it is a 32 bit lib file. The Application Binary Interface (ABI) of a 32 bit and a 64 bit lib file are totally incompatible making it impossible to use a 32 bit lib in a 64 bit environment.
Microsoft (R) COFF/PE Dumper Version 10.00.40219.01
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file Threadclass.lib
File Type: LIBRARY
FILE HEADER VALUES
14C machine (x86)
37E number of sections
4512CE17 time date stamp Thu Sep 21 13:38:31 2006
38C11 file pointer to symbol table
A94 number of symbols
0 size of optional header
Comments on this post
March 5th, 2013, 08:30 PM
I guess the lab machines at school must use a 32-bit Linux, probably because nobody has made a 64-bit version of this particular library that CS majors must use for this required course.
But if that were the case how was I able to do stuff with x86-64 assembler on the lab machines last semester, wouldn't I need to use a 64-bit Linux to do such a thing? Or is Linux somehow different?
Or maybe it doesn't actually work on the lab machines either :confused:
Last edited by jakotheshadows; March 5th, 2013 at 08:39 PM.
March 5th, 2013, 11:25 PM
Hidden somewhere away under the control of the tutor, there will be a ThreadClass.cpp file used to generate a ThreadClass.lib
Being source code, it would be possible to generate
ThreadClass.lib for x86, 32-bit code for Windows
ThreadClass.lib for x86-64, 64-bit code for Windows
ThreadClass.lib for x86-64, 64-bit code for Linux
ThreadClass.lib for x86, 32-bit code for Linux
It really doesn't matter which architecture the lab machine is, it will have a compatible lib built for it.
The problem for you is that the one you need doesn't exist.
Whether your tutor wants to spend time making the version you want is something you need to discuss with them. But perhaps you could point out to them that you may be the first to want a 64-bit version, but you sure won't be the last.
You're fortunate enough to end up in a fairly enlightened college where different compilers are supported, and perhaps even encouraged. It's the poor souls who have now resort to running TurboC in DosBox who are really being screwed over.
March 6th, 2013, 08:30 AM
LOL, where do they do this, in India?
Originally Posted by salem
Well, different compilers aren't discouraged, but whenever we submit code it has to work on the lab machines and it has to compile with the compiler the graders will use.
It would be nice to be able to get my code "conceptually done" at home with a nice IDE and GUI debugger before going back to the good 'ol Linux command line.
Last edited by jakotheshadows; March 6th, 2013 at 08:33 AM.
March 6th, 2013, 09:35 AM
It is not about the environment, it is about the build - you cannot link a 32 bit library to 64 bit code perhaps, but I don't believe that stops you building and executing 32 bit code in a 64 bit
Originally Posted by BobS0327
Last edited by clifford; March 6th, 2013 at 09:38 AM.
March 6th, 2013, 10:04 AM
Do you mean I might be able to build the Smoker's Problem project as 32-bit code and that would solve the problem I'm having?
Originally Posted by clifford