Fatal Error C1057
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Visual Studio - Fatal error C1057 up vote 0 down vote favorite I'm using Visual Studio 2005 and getting trained in building WinCE 6.0 OS Image. I'm in the pin mux setup part. I have set a macro BSP_HC1, so the coding with that macro alone should work. A part of the coding is, #define PAD_ENTRY(x,y) {PAD_ID(x),y,0}, #define SAFE_MODE 7 #define PAD_ID(x) (offsetof(OMAP_SYSC_PADCONFS_REGS,CONTROL_PADCONF_##x)/sizeof(UINT16)) // OMAP_SYSC_PADCONFS_REGS is a structure and CONTROL_PADCONF_GPMC_A1 (for eg.,) is an element in it. #define INPUT_DISABLED (0<<8) #define MUXMODE(x) ((x & 0x7)<<0) typedef struct { UINT16 padID; unsigned int Cfg:15; unsigned int inUse:1; } PAD_INFO; #ifdef BSP_HC1 #define GPMC_PADS \ PAD_ENTRY(GPMC_A6 ,INPUT_DISABLED | MUXMODE(SAFE_MODE)) \ PAD_ENTRY(GPMC_nCS2 ,INPUT_DISABLED | MUXMODE(0)) #else #define GPMC_PADS \ PAD_ENTRY(GPMC_A1 ,INPUT_DISABLED | MUXMODE(0)) \ PAD_ENTRY(GPMC_A2 ,INPUT_DISABLED | MUXMODE(0)) \ PAD_ENTRY(GPMC_A3 ,INPUT_DISABLED | MUXMODE(0)) #endif It is called in main.c as, static const PAD_INFO ebootPinMux[] = { DSS_PADS GPMC_PADS USBOTG_PADS END_OF_PAD_ARRAY }; While compiling I get the error: fatal error C1057: unexpected end of file in macro expansion and it points to GPMC_PADS. The msdn explains the error that I might miss some parenthesis. But, that didn't help me solve this. Kindly guide me. c embedded s
· Log in · Help ForumsCategoryBoardDocumentsUsers turn on suggestions Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type. Showing results for Search instead for Did you mean: Reply Topic Options Subscribe to RSS Feed Mark Topic as New Mark Topic as Read Float this Topic to the Top Bookmark Subscribe Printer Friendly Page All Forum Topics http://stackoverflow.com/questions/17269345/visual-studio-fatal-error-c1057 Previous Topic Next Topic fatal error C1057: unexpected end of file in macro expansion fatal error C1057: unexpected end of file in macro expansion hellis Member 09-24-2009 09:11 AM Options Mark as New Bookmark Subscribe Subscribe to RSS Feed Highlight Print Email to a Friend Report to a Moderator Hi,I want to construct a https://forums.ni.com/t5/Multifunction-DAQ/fatal-error-C1057-unexpected-end-of-file-in-macro-expansion/td-p/990610 program for my NI USB 6009 (using Visual Studios/C++ 6.0) which: 1. Receive a trigg-signal and on the first rising signal start to write digital signals, after a certain delay.2. After writing a certain amount of digital signals it should read an analog signal.I have tried to write in different ways but I only receive errors... I would be glad for some tips and help. I am new in the area and excuse if I have done fatal errors.This is one of my programs:__________________________________________________________________________________________________________________//ADC-program// Definitions#include "stdafx.h" #include "NIDAQmx.h" #include
2010\projects\win32 projects\winmain.cpp(53): error C2440: '=' : cannot convert from 'const char [15]' http://www.cplusplus.com/forum/windows/45682/ to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires https://bugreports.qt.io/browse/QTBUG-24983?page=com.atlassian.streams.streams-jira-plugin:activity-stream-issue-tab reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\documents\visual studio 2010\projects\win32 projects\winmain.cpp(77): fatal error C1057: unexpected end of file in macro expansion ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== The equal sign is underlined here wc.lpszClassName = "MyWndClassName"; and ZeroMemory fatal error is underlined here 1
2
MSG msg; ZeroMemory(&msg, sizeof(MSG); Jun 28, 2011 at 7:48pm UTC freddie1 (1422) #include "tchar.h" TCHAR szClassName[]=_T("MyWndClassName"); ... ... ... wc.lpszClassName=szClassName; Youn shouldn't need ZeroMemory() there. Last edited on Jun 28, 2011 at 7:55pm UTC Jun 28, 2011 at 7:52pm UTC nano511 (373) Thank you! Jun 28, fatal error c1057 2011 at 7:59pm UTC freddie1 (1422) Consider that Microsoft Visual Studio defaults to UNICODE builds. If you use the tchar.h macros your code will always work. If you are using chars instead of TCHARs, then you would likely be better off going into to 'Properties' and setting the character set to 'Multi-Byte' or 'unset'. You would probably be better off sticking to the wide character stuff so you get used to it. Jun 29, 2011 at 8:41pm UTC nano511 (373) Okay now the equal sign under winClass.hbrBackground = GetStockObject(BLACK_BRUSH); is red and it says Error: a value of type "HGDIOBJ" cannot be assigned to an entity of type "HBRUSH" Help is very appreciated! Topic archived. No new replies allowed. C++ Information Tutorials Reference Articles Forum Forum BeginnersWindows ProgrammingUNIX/Linux ProgrammingGeneral C++ ProgrammingLoungeJobs Home page | Privacy policy© cplusplus.com, 2000-2016 - All rights reserved - v3.1Spotted an error? contact us
error C1057Agile Board ExportXMLWordPrintable Details Type: Bug Status: Closed Priority: Not Evaluated Resolution: Incomplete Affects Version/s: 4.8.0 Fix Version/s: None Component/s: Other Labels: None Environment: QT4.8.0 Source code with the vs2010 Description I failed to compile QT4.8.0 Source code with the vs2010,as the following command: 1.configure -platform win32-msvc2010 2.nmake the error is that: c:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\yvals.h(21) : warning C 4005: "_HAS_TR1": redefined platform\DefaultLocalizationStrategy.cpp(327) : error C2001: platform\DefaultLocalizationStrategy.cpp(327) : fatal error C1057: NMAKE : fatal error U1077: ""c:\Program Files\Microsoft Visual Studio 10.0\VC\B IN\cl.EXE"": 返回代码"0x2" Stop. NMAKE : fatal error U1077: ""c:\Program Files\Microsoft Visual Studio 10.0\VC\B IN\nmake.exe"": 返回代码"0x2" OptionsSort By NameSort By DateAscendingDescendingAttachments error.txt 27/Mar/12 3:18 AM 17 kB xulinguestc OptionsIssue OnlyShow All ReviewsShow Open ReviewsShow All IssuesShow Open IssuesGerrit Reviews No reviews matched the request. Check your Options in the drop-down menu of this sections header. Activity All Comments Work Log History Activity Transitions Activity Stream People Assignee: Unassigned Reporter: xulinguestc Votes: 0 Vote for this issue Watchers: 3 Start watching this issue Dates Created: 27/Mar/12 3:18 AM Updated: 19/Sep/14 2:31 PM Resolved: 11/Oct/12 12:26 PM Agile View on Board Gerrit Reviews There are no open Gerrit changes Atlassian JIRA Project Management Software (v6.3.9#6339-sha1:46fa261) About JIRA Report a problem Atlassian