1

I'm trying to setup local Windows eclipse for remote Linux development. I have encountered problem with eclipse not recognizing simple 'printf()' statement from <stdio.h>. I didn't find any helpful resources ATM to solve this problem, so wondering if you could help me with this.

  • Header files used from: Visual Studio Build Tools 2022, specifically I'm including this folder for stdio.h file: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041\ucrt'

Eclipse GCC C++ compiler settings

  • GCC C++ Compiler as: "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\Llvm\bin\clang.exe"

C/C++ General -> Path and Symbols

Eclipse IDE still highlights this as 'Function cannot be resolved':

Warning eclipse 'printf'

I am not sure, but looks like 'printf' function is available at 'stdio.h':

printf signature from 'stdio.h' file

Update:

  • Eclipse version used: Eclipse version
  • Using command line build is working as expected: Compiling works okay
  • Program runs as expected:

Running program

So the questions are:

What needs to be done so eclipse would recognize 'printf'? e.g. Change MS Win Kits for another compiler header files? Or my eclipse configs are wrong?

If it is not possible for eclipse to recognize 'printf', is there an option to ignore all warnings on 'printf' (not highlight them)?

Let me know would you need anymore details from my side.

1 Answer 1

0

After some investigation I think 'clang' is not compatible with eclipse & it's way easier to install & use 'cygwin' for such purposes.

Some references:

https://www.eclipse.org/forums/index.php/t/1092409/

https://www.eclipse.org/forums/index.php/t/1102938/

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.