|
To build a solution, you can simple pass in the path to the solution file and optionally a configuration, such as debug or release. Projects are compiled by using the Project switch, and you can build one project at a time, also optionally specifying the configuration to use.
The syntax to use is:
devenv solutionfile.sln /build [solutionconfig]
[/project projectnameorfile [/projectconfig name]]
My question is,
1)if we dont specify configuration either "debug" or "release" as it is optional, will it build both debug and release or any one (debug or release) by default.
2) Any idea how to build both "debug" and "release" in one command line.
Thanks,
Nandu
|
|
|
|
|
Nandu_77b wrote: 1)if we dont specify configuration either "debug" or "release" as it is optional, will it build both debug and release or any one (debug or release) by default.
What happens when you try?
Nandu_77b wrote: 2) Any idea how to build both "debug" and "release" in one command line.
No, but there may be some suggestions here[^].
MVP 2010 - are they mad?
|
|
|
|
|
I don't use the devenv program, but from a batch file I use something like this:
vcbuild /r /useenv \Source\Mapp\bld\myapp.sln $ALL
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
We have several exes that need access to common dialogs for database administration on common tables. Dialogs need access to a database via ADO/ODBC and user interface. We have in the past recreated the same dialog repeatively. Getting tired of doing that. Would like to create for each dialog an EXE/DLL or something that we can link at runtime in case of changes. A DLL looks like the best way. Any BOOKS or PUBLICATIONS out there to exactly guide us from creating , calling from current EXEs, and distribution? Really need step by step not just a reference document. Would just creating an EXE for each dialog and shell execute would work? Pros / cons.
thank you
|
|
|
|
|
|
(If you're using MFC) We had a similar problem, and eventually, after lots and lots of deliberation, we opted for a non-portable solution, where the DLL with the dialogs export the entire CDialog classes, using the __dllexport keyword in the class declaration. Code won't be reusable by any other platform or compiler, but it works... You could pass in a CDatabase or what have you to the dialog constructor.
|
|
|
|
|
Hello, I'm having a very difficult time changing parameters using code to a program that has a few labels. I was able to move their position, change their color, but unfortunately not their sizes. This project also uses ActiveX. I'm using VS 2008, and the only articles that give any insight are all for VS 6.
m_lblctrl1.SetWindowPos(&wndBottom,0,0,0,0,SWP_NOSIZE);
changes m_lblctrl1 position (x,y,cx,cy)
m_lblctrl1.SetForeColor(RGB(255,0,0));
changes m_lblctrl1 to red.
m_lblctrl1.SetFont(LPFONTDISP);
now this is where i've been hitting a very bad wall
this is the method i've been tackling.
CFont font;
LOGFONT lf;
memset(&lf, 0, sizeof(LOGFONT));
lf.lfHeight = 12;
strcpy_s(lf.lfFaceName, "Arial");
VERIFY(font.CreateFontIndirect(&lf));
m_lblctrl1.SetFont(&lf);
the error i'm getting is "error C2664: 'CLabel::SetFont' : cannot convert parameter 1 from 'LOGFONT *' to 'LPFONTDISP' " I've done all the research i could do to properly troubleshoot this, but unfortunately i've hit the point where i need professional help. m_lblctrl1 is defined as a CLabel in case that helps. Also i used Do Data Exchange from the original label defined:
DDX_Control(pDX, IDC_LBLCTRL1, m_lblctrl1);
If anyone has experience with this LPFONTDISP and how to change the label size/font, i'd greatly appreciate help.
Thank you for any input, if there is any details i left out, I'd gladly add it.
-David
|
|
|
|
|
Dragondima wrote: m_lblctrl1.SetFont(&lf);
Why don't you use
m_lblctrl1.SetFont(&font);
?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hey, thanks for the reply!
I tried this earlier, and got the same "error C2664: 'CLabel::SetFont' : cannot convert parameter 1 from 'CFont *' to 'LPFONTDISP'"
|
|
|
|
|
OK. Now I'm aware your CLabel is an ActiveX control. You have to use OleCreateFontIndirect [^].
Sample code here.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thanks for the reply!
I'm having a hard time getting the exgrid.dll to work, their examples give me a lot of errors. This was more for VS 6 i'm using 2008. I don't know if this would make a difference, i downloaded the file, but haven't had much success. Other suggestions would be greatly appreciated!
|
|
|
|
|
Hi
I need to read and save a class instance pointer.
class A
{
}
A* pClassA = new A(); I want to read and save "pClassA" from and to a file. What kind of data type it is? How many bytes it will take?
I am using CFile to do file IO.
Best regards,
modified on Thursday, January 21, 2010 9:15 AM
|
|
|
|
|
Saving a pointer doesn't make any sense. A pointer is merely a memory address, how useful would that be ?
What you probably want to do instead is save the content of your object to the file. In that case, you will need to save each member variables separately.
I suggest you take a look at this article[^] (and the full series) to have a better understanding of serialization.
|
|
|
|
|
Usually, that make no sense: a pointer contains the address of an object, so what is the purpose of storing it? If you need to store the class instance (i.e. the object itself) then you should look at serialization (Serialization on Wikipedia, Serialization in MFC).
Ah, of course the size of the pointer pClass is
sizeof(pClass)
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi I all a newbie here. need help with this:
char *strtok( char *str1, const char *str2 );
char str[] = "now # is the time for all # good men to come to the # aid of their country";
char delims[] = "#";
char *result = NULL;
result = strtok( str, delims );
while( result != NULL )
{
printf( "result is \"%s\"\n", result );
result = strtok( NULL, delims );
}
for char str[] , how can i assign it to a variable b? so far i get this error:
readin.cpp:34: error: initializer fails to determine size of ‘str
Thanks alot.
|
|
|
|
|
xivShin wrote: char *strtok( char *str1, const char *str2 );
What's the purpose of the above line?
xivShin wrote: char str[] = "now # is the time for all # good men to come to the # aid of their country"
Is the compiler complaining of the above line? Strange! What compiler are you using?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
first address the issue pointed out by the esteemed CPallini
then, try either
char str[74] = "now # is the time for all # good men to come to the # aid of their country";
or
char * str = "now # is the time for all # good men to come to the # aid of their country";
|
|
|
|
|
if b is a pointer:
char *b = str;
or
if b is an array and you need to copy the whole null terminated string to it:
#define SIZE 200 // or any suitable value
char b[SIZE];
strcpy( b, str );
One suggestion: please use meaningful names as variable names instead of b
|
|
|
|
|
Raj Indian wrote: One suggestion: please use meaningful names as variable names instead of b
b is soooooooooo meaningful.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
You don't have a variable b in your program. Therefore it's hard to determine what the message means -- we don't know the type of b. So you need to offer more details.
|
|
|
|
|
xivShin wrote: for char str[] , how can i assign it to a variable b?
char* b = str;
But remember that b is merely a pointer to the same string. If you want a copy then you need to use strcpy() or some derivative.
MVP 2010 - are they mad?
|
|
|
|
|
Hello,
i need to show text underlined in CListCtrl when someone goes with the mouse over them, the text is always URL Adress,
and when the mouse is over a other cell it should be a just normal text!
My solution is not good, because the row is bigger then before and it dont restore the text to previos style when i move the mouse to other cell!
(I try with CDC, CFont, LOGFONT, CRect etc.!)
I hope that is understandable what i mean!?
Is there any way to do this!
(i think i see here a sample with this, but i cant find it!)
Thanx for any help!
Arrin
|
|
|
|
|
Try CListCtrl::SetExtendedStyle()
refer: http://msdn.microsoft.com/en-us/library/bb774732(VS.85).aspx
|
|
|
|
|
Hi,
I am trying to run a .bat file through command prompt using code via ShellExecute but not able to do so.
ShellExecute(NULL,_T("open"),_T("cmd.exe"),_T("b.bat iiso.img"),szDefaultDir,SW_SHOW);
I am getting command prompt but not able to execute command (bat file)?
|
|
|
|
|
I think you may need the "/C" option to get cmd to run the batch file thus:
ShellExecute(NULL,_T("open"),_T("cmd.exe"),_T("/C b.bat iiso.img"),szDefaultDir,SW_SHOW);
MVP 2010 - are they mad?
|
|
|
|