CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2013
    Posts
    161

    configuration in a php file

    hello forum,
    going through the source of an application I found online, I notice the programmer placed the configuration file of the application in a .php file obviously written in php...
    the whole winapi code is written in c++ but the configuration was writting in php... this is the snippet
    Code:
    $commandLineOptions['client']['win32'] = array
    (
      'name'        => 'client32.bin',
      'subsys'      => 'WINDOWS',
      'cpp_options' => '/D "SECURITY_WIN32" /I "'.$dir['source']['common'].'"',
      'lnk_options' => '/ENTRY:CoreIn::_entryPoint /MERGE:.rdata=.text /FIXED:NO kernel32.lib user32.lib advapi32.lib shlwapi.lib shell32.lib secur32.lib psapi.lib ole32.lib gdi32.lib comctl32.lib ws2_32.lib crypt32.lib wininet.lib lde32.lib msxml2.lib oleaut32.lib netapi32.lib userenv.lib comdlg32.lib mpr.lib uuid.lib'
    );
    notice the lnk_options'=>'/ENTRY:
    so the question is, why will the programmer do something like that instead of specifying it directly in visual studio line options? In what case scenarious are these things done or needed? Of course seeing php what comes to mind first is "server"...but I just can't fathom where this comes in...
    someone shed some light...

  2. #2
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: configuration in a php file

    Quote Originally Posted by TheLionKing View Post
    so the question is, why will the programmer do something like that instead of specifying it directly in visual studio line options?
    This is VC++ compiler options passed to cl.exe properly. You can build a binary with a single command line like this:
    Code:
    cl.exe %SOURCE_FILES% %CPP_OPTIONS% /link /out:%NAME% /subsystem:%SUBSYS% %LINK_OPTIONS%
    And why would programmer do something like that was up to programmer himself. Definitely he builds something on web server side where cl.exe is in the path.
    Last edited by Igor Vartanov; August 10th, 2016 at 03:14 AM.
    Best regards,
    Igor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured