Author Topic: undefined reference to `GetSaveFileNameA@4'|  (Read 386 times)

Offline mrkaban

  • Single posting newcomer
  • *
  • Posts: 2
    • КонтинентСвободы.рф
undefined reference to `GetSaveFileNameA@4'|
« on: July 11, 2017, 05:55:39 pm »
Hello dear forum users! Just want to apologize for my English. Also I apologize for being just a beginner.

Faced such a mistake
Quote
\main.cpp|198|undefined reference to `GetSaveFileNameA@4'|

Here is the function in which the problem arises
Code: [Select]
void newGradebookDialog( HWND hwnd, TCHAR file[] )
{
   OPENFILENAME ofn;

  TCHAR saveFileName[MAX_PATH] ="";

   ZeroMemory( &ofn, sizeof( ofn ) );

    ofn.lStructSize = sizeof(OPENFILENAME);
    ofn.hwndOwner = hwnd;
    ofn.lpstrFilter = "CSV File (*.csv)\0*.csv\0";
    ofn.lpstrFile = saveFileName;
    ofn.nMaxFile = MAX_PATH;
    ofn.lpstrDefExt = "csv";
    ofn.Flags  = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
    ofn.lpstrTitle = "Export to CSV";

 if(GetSaveFileName(&ofn))
  strcpy(file,saveFileName);
}

Yes, the development environment points to the next line

Code: [Select]
if(GetSaveFileName(&ofn))
Thankful in advance for any help! If the topic did not create the right place, I apologize.
« Last Edit: July 11, 2017, 05:57:22 pm by mrkaban »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5896
    • My Best Post
Re: undefined reference to `GetSaveFileNameA@4'|
« Reply #1 on: July 11, 2017, 06:18:27 pm »
Read the rules and look to this link http://www.cplusplus.com/forum/windows/72278/

Link to rules http://forums.codeblocks.org/index.php/topic,9996.0.html

If  you can NOT figure out where to enter the library name ask in this thread.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline mrkaban

  • Single posting newcomer
  • *
  • Posts: 2
    • КонтинентСвободы.рф
Re: undefined reference to `GetSaveFileNameA@4'|
« Reply #2 on: July 12, 2017, 01:59:54 pm »
Thank you very much! I'm sorry, I could not find this page myself.

Thank you very much, it helped!