Go Back   Steam Users' Forums > Steam Tool Discussions > Source Coding

Reply
 
Thread Tools Display Modes
Old 05-30-2007, 07:13 AM   #1
knive1
 
Banned
Join Date: Aug 2006
Reputation: 0
Posts: 27
Question How change OUTPUT file in cpp file ?

how can i change the output file using the cpp #pragma or other things ??


eg.

Code:
#define CHANENAME

#ifdef CHANENAME
#define FILENAME "plugin_new"
// code to set output file name (/OUT)
#else
#define FILENAME "plugin"
// code to set output file name (/OUT)
#endif
is possible?
knive1 is offline  
Reply With Quote
Old 05-30-2007, 09:09 AM   #2
Marine
 
Join Date: Sep 2006
Reputation: 9
Posts: 2,691
What are you trying to do? Change the output filename? say change server.dll to custommod.dll?

You cna do that in the Projects properties, right click your project, properties, General (Or C++) and go to Output.
Marine is offline   Reply With Quote
Old 05-30-2007, 09:11 AM   #3
knive1
 
Banned
Join Date: Aug 2006
Reputation: 0
Posts: 27
Quote:
Originally Posted by Marineio View Post
What are you trying to do? Change the output filename? say change server.dll to custommod.dll?

You cna do that in the Projects properties, right click your project, properties, General (Or C++) and go to Output.
yes, but i want change in a cpp file or h file using some #pragma or anything this is for a plugin

change from VPS to MM names
because my plugin require names because im exporting things and this need the dll with rigth name
knive1 is offline   Reply With Quote
Old 05-30-2007, 09:13 AM   #4
Marine
 
Join Date: Sep 2006
Reputation: 9
Posts: 2,691
I dont get what you are trying to do... Are you trying to get some cpp files to compile into their own dll?
Marine is offline   Reply With Quote
Old 05-30-2007, 09:15 AM   #5
knive1
 
Banned
Join Date: Aug 2006
Reputation: 0
Posts: 27
Quote:
Originally Posted by Marineio View Post
I dont get what you are trying to do... Are you trying to get some cpp files to compile into their own dll?
NO, only trying change dll build file name in a code not in project proprietis
knive1 is offline   Reply With Quote
Old 05-30-2007, 09:17 AM   #6
Marine
 
Join Date: Sep 2006
Reputation: 9
Posts: 2,691
But what would that achieve? Changing it in the properties is the right way to do it, there will be other options for what you want to do in there also...
Marine is offline   Reply With Quote
Old 05-30-2007, 09:20 AM   #7
knive1
 
Banned
Join Date: Aug 2006
Reputation: 0
Posts: 27
Quote:
Originally Posted by Marineio View Post
But what would that achieve? Changing it in the properties is the right way to do it, there will be other options for what you want to do in there also...
and how can i changeit the output file (/OUT) using #pragma???

i have tryed :

#pragma comment(linker, "/OUT:\"Release/win32/sourceutils.dll\"")

but dont work
knive1 is offline   Reply With Quote
Old 05-30-2007, 09:27 AM   #8
Marine
 
Join Date: Sep 2006
Reputation: 9
Posts: 2,691
Hmm... i think i get what you mean (If something is defined then output one file, if another, output another).
Marine is offline   Reply With Quote
Old 05-30-2007, 09:30 AM   #9
knive1
 
Banned
Join Date: Aug 2006
Reputation: 0
Posts: 27
Quote:
Originally Posted by Marineio View Post
Hmm... i think i get what you mean (If something is defined then output one file, if another, output another).
no this say errors in .exp file and output the project name to file
knive1 is offline   Reply With Quote
Old 05-30-2007, 09:48 PM   #10
softboysxp
 
Guest
Posts: n/a
Maybe you can just add a building profile in Visual Studio, and dunno why #pragma comment won't work
  Reply With Quote
Old 05-31-2007, 05:33 AM   #11
knive1
 
Banned
Join Date: Aug 2006
Reputation: 0
Posts: 27
Quote:
Originally Posted by softboysxp View Post
Maybe you can just add a building profile in Visual Studio, and dunno why #pragma comment won't work
i remove in settings the output file and in my cpp i set the #pragma but that say errors in .exp file
knive1 is offline   Reply With Quote
Old 05-31-2007, 08:22 AM   #12
softboysxp
 
Guest
Posts: n/a
I tried the #pragma method on my machine, it just gave out a warning, but the output was a wrong file

Last edited by softboysxp: 05-31-2007 at 08:34 AM.
  Reply With Quote
Old 05-31-2007, 09:09 AM   #13
knive1
 
Banned
Join Date: Aug 2006
Reputation: 0
Posts: 27
Quote:
Originally Posted by softboysxp View Post
I tried the #pragma method on my machine, it just gave out a warning, but the output was a wrong file
yes

anyone can sayme how i can do that?
knive1 is offline   Reply With Quote
Reply

Go Back   Steam Users' Forums > Steam Tool Discussions > Source Coding


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -7. The time now is 02:50 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site Content Copyright Valve Corporation 1998-2014, All Rights Reserved.