Discussion:
save cpp file as object file
(too old to reply)
Larry
2010-01-11 02:57:47 UTC
Permalink
Hi,

I am writing a class made up of a class.h file and a class.cpp file. I'd
like to share that class without providing the original source code... so I
think I should share a class.h file and a class.obj file...How can I get a
.obf file from a .cpp file??

I'd like a class.obj file as a release version

thanks
Nathan Mates
2010-01-11 03:29:21 UTC
Permalink
Post by Larry
I am writing a class made up of a class.h file and a class.cpp file. I'd
like to share that class without providing the original source code... so I
think I should share a class.h file and a class.obj file...How can I get a
.obf file from a .cpp file??
.obj files are not really portable. See your compiler documentation
(you didn't specify *which* compiler you use, so we can't be more
specific as to this step) as to how to make a .lib file -- which is
designed specifically for this purpose. .lib files are made from one
or more .c and/or .cpp files, and and don't provide the source code.

Nathan Mates

--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein
Larry
2010-01-11 12:22:14 UTC
Permalink
Post by Nathan Mates
.obj files are not really portable. See your compiler documentation
(you didn't specify *which* compiler you use, so we can't be more
specific as to this step) as to how to make a .lib file -- which is
designed specifically for this purpose. .lib files are made from one
or more .c and/or .cpp files, and and don't provide the source code.
VC++ EE on windows vista...actually I don't mean to share it as I would do
with a DLL. it is just to share it across a small group of programmers
dealing with the same app.
Stephan T. Lavavej [MSFT]
2010-01-11 19:33:53 UTC
Permalink
LIB files are essentially convenient packages of OBJ files.

STL
Post by Larry
Post by Nathan Mates
.obj files are not really portable. See your compiler documentation
(you didn't specify *which* compiler you use, so we can't be more
specific as to this step) as to how to make a .lib file -- which is
designed specifically for this purpose. .lib files are made from one
or more .c and/or .cpp files, and and don't provide the source code.
VC++ EE on windows vista...actually I don't mean to share it as I would do
with a DLL. it is just to share it across a small group of programmers
dealing with the same app.
Continue reading on narkive:
Loading...