linker error

What are the sources of this type of error?  I am using visual studio and i get this error.

fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

also in windows, what is the best way to check file types (ie 32 bit or 64 bit)?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MSDN explains this pretty well: ("Linker Tools Error LNK1112")

[...] if you create one module with the x64 compiler and another module with the x86 compiler, and try to link them, the linker will generate LNK1112.

So, it seems that one object file or library involved in your build process is 64bit.

To find out which one, start a 'Visual Studio Command Prompt' (from your 'Tools' menu). If - depending on your VS version - that isn't available, start a command window, 'cd' to the directory where your VS installation has 'vcvars32.bat' and execute that one. This will add all necessary paths. Then you can use 'dumpbin /headers' with your file(s) in question, the headers section contains the machine type you want to find out.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
module machine type 'x64'
that means you try to link against an obj file or a lib file which is compiled with 64-bit compiler.

target machine type 'X86'
that means that the project is a 32-bit project.

unfortunately you can't see with normal windows means (explorer) whether a library is 32-bit or 64-bit. but, since 32-bit and 64-bit modules never can be mixed, the whole folder contains either 32-bit or 64-bit modules but never mixed (beside you do it forcefully).

be aware that on a 64-bit platform you have system32 as 64-bit folder and syswow64 folder for 32-bit.

sorry i didn't want to repeat but i didn't refresh the screen.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.