|
Hi all,
I've just finished my c++ application on vc++ 2008 but I've found out that it needs the framework 3.5 to run.
Is there something to configure to make it independent from framework?
Thanks.
rotter
|
|
|
|
|
so you didn't code C++ but C++/CLI...
if you're using pure Win32 or pure MFC, you shouldn't have any dependency to the .NET Framework.
but if you mixed both... don't wonder
|
|
|
|
|
In the project settings should be an option to specify the framework version.
Greetings from Germany
|
|
|
|
|
Thank you for answering so fast!
But my project is pure prehistorical win32 api. It has no references to anything and I didn't find the framework version on the project settings either.
Maybe it's time to go back to good old vs2005
rotter
|
|
|
|
|
I have not used 2008. I have not read anything about it that would lead me to believe they dropped suppport for creating native C++ applications. It is far more likely that you just have not figured out how to do it.
|
|
|
|
|
Visual Studio 2008 needs the 3.5 framework to run. However, your (native) c++ applications compiled with VS 2008 don't need this framework.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Well, I finally solved it installing VS2005 , but I kept VS2008 too. If someone finds out the trick to make it work please write an article or something.
Cheers
rotter
|
|
|
|
|
While trying to build this project I get the following link error:-
<code>Error 26 error LNK2019: unresolved external symbol "char * __stdcall _com_util::ConvertBSTRToString(wchar_t *)" (?ConvertBSTRToString@_com_util@@YGPADPA_W@Z) referenced in function "public: virtual long __stdcall SmartGraph::SetLegendText(wchar_t *,long,long,long,long)" (?SetLegendText@SmartGraph@@UAGJPA_WJJJJ@Z) SmartGraph.obj</code>
It seems to be caused by the line:-
<code>m_strLegend = _com_util::ConvertBSTRToString(strText);</code>
I am using VS 2005, any suggestions please.
|
|
|
|
|
You need to add the library comsupp.lib (see [^]) to your project Linker command line options.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hope to learn and help others learn too.
|
|
|
|
|
Welcome. Having been here six months I can highly recommend it as a place to learn a lot and help other a bit as well.
By the way please post chatty messages in the Lounge to avoid being flamed and programming questions anywhere but the Lounge to avoid being thoroughly barbecued
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
welcome at the codeproject...
if you have any (specific) questions, don't hesitate.
|
|
|
|
|
Welcome to Codeproject and this forum for start do you have a question or problem on the vc++(your program)?
|
|
|
|
|
Hi,
am sundar.I have one question in vc++.I have a problem when i accessing the https site through code.But its working in .net as well as in browser. How to access the https through vc++ code?
how to set the SSLClientCertificate Name in code?
SoapClient3.ConnectorProperty("SSLClientCertificat eName") =LOCAL_MACHINE\[store-name\]]cert-name ;
The http site is working when i access through the code?
Please give me the procedures to access the https site through vc++ code?
Anyhelp would be appreciated.
Regards,
R.Sundar
sundar
|
|
|
|
|
Hi
Please How I can delete element from the struct that contain arrays
This is My Code
<br />
struct Member<br />
{<br />
char name[50];<br />
char address[30];<br />
int number;<br />
};<br />
struct Member member[100];<br />
<br />
And i have this Function for delete elements But how i can complete it<br />
<br />
void delete_member ()<br />
{<br />
int search;<br />
<br />
cout <<"Enter Your Number of member:";<br />
cin >> search;<br />
<br />
for (int i=0;i<100;i++)<br />
{<br />
if (member[i].number == search)<br />
{<br />
<br />
<br />
}<br />
}<br />
<br />
-*-*-*-*-*-*-*-*-*
To Be Or Not To Be
(KARFER)
-*-*-*-*-*-*-*-*-*
|
|
|
|
|
You can't remove elements in such an array. And even worse, your array will be initialized with garbage structures (except if you provide a default constructor to your structure).
I suggest you take a look at a std::list, this will do what you are looking for (but you'll probably need some time to learn how to use it, look for some tutorials).
|
|
|
|
|
You cannot remove an element from a "hard-coded" array like that, you will need to either mark/tag the element as "removed" or copy the elements that you want to keep to a new array and remove the old one. but that sucks.
If you need to add and remove elements to an "array", I suggest you have a look at ode>std::list (not std::vector ).
|
|
|
|
|
Since the array is allocated onto the stack you cannot delete (i.e. remove) items. However you can erase the info wherein, for instance:
...
for (int i=0;i<100;i++)
{
if (member[i].number == search)
{
member[i].number = -1;
memset( member[i].name, 0, 50);
memset( member[i].address, 0, 30);
break;
}
}
...
You can also use an old (soft removing) trick: swap the found item content with the (currently) last one and decrease the element count.
BTW: don't use explicitely numbers (eg. 50 , ...) in code, use meaningful symbolic consts instead (e.g. NAME_SIZE , ...).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
think STL buddy, think STL !
|
|
|
|
|
Otherwise I'll keep getting tons of 1.0 !!!!
Honestly, I rarely suggest STL usage to newbies.
STL is very good (in fact, state of the art if I have to compare it with, say MFC counterparts) but IMHO a lot of people find too hard the STL learning step and I'm afraid to suggest a rather advanced topic to a newbie (even if the benefits are worthy the effort).
[added]
Furthermore, I think a C++ programmer must be able to do some memory management before switching to container classes. If one just don't like the argument there's a pletora of managed languages...
BTW Who cares about stupid 1.0 of stupid guys ?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
is it better like that ?
lol
actually, i prefer confuse even newbies a bit with STL, rather than push then in dynalically allocating memory, then leading toward memory leaks...
pushing people into STL will make then make the effort of learning it... since then, they will never look around anymore
so, please, edit your post and slide a little STL note in it
|
|
|
|
|
toxcct wrote: actually, i prefer confuse even newbies a bit with STL, rather than push then in dynalically allocating memory, then leading toward memory leaks...
If they shouldn't face memory allocation then is better a C# migration. On the other hand, if they want the metal then metal to them!
toxcct wrote: pushing people into STL will make then make the effort of learning it... since then, they will never look around anymore
STL has the grat advantage of being rigorous. It turns out to be a (learning) disvantage for not-so-rigorous people .
toxcct wrote: o, please, edit your post and slide a little STL note in it
You know I'll never do that.
BTW: who has changed the 1.0 vote(in fact was a 2.0 ) to my post (i.e. only the original poster has the power to?)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
CPallini wrote: BTW: who has changed the 1.0 vote(in fact was a 2.0) to my post (i.e. only the original poster has the power to?)
you prefer i go back to 2.0 ? lol
ok, you got me... was me
but hey, at least, the voting system has that better than the previous one, that if we want to change a vote, we still can...
CPallini wrote: You know I'll never do that
why ?!
|
|
|
|
|
Thank you for all things
-*-*-*-*-*-*-*-*-*
To Be Or Not To Be
(KARFER)
-*-*-*-*-*-*-*-*-*
|
|
|
|
|
KARFER wrote: To Be Or Not To Be
(KARFER)
Are you sure that is yours?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|